HAL1 CRYP –> HAL2 AES ¶
This section provides information about the HAL AES constants migration .
Error code ¶
|
HAL1 |
HAL2 |
|---|---|
#define HAL_CRYP_ERROR_NONE
|
#define HAL_AES_ERROR_NONE
|
#define HAL_CRYP_WRITE_ERROR
/* or */
#define HAL_CRYP_ERROR_WRITE
|
#define HAL_AES_ERROR_WRITE
|
#define HAL_CRYP_READ_ERROR
/* or */
#define HAL_CRYP_ERROR_READ
|
#define HAL_AES_ERROR_READ
|
#define HAL_CRYP_ERROR_KEY
|
#define HAL_AES_ERROR_KEY
|
#define HAL_CRYP_ERROR_RNG
|
#define HAL_AES_ERROR_RNG
|
#define HAL_CRYP_DMA_ERROR
/* or */
#define HAL_CRYP_ERROR_DMA
|
#define HAL_AES_ERROR_DMA
|
#define HAL_CRYP_BUSY_ERROR
#define HAL_CRYP_ERROR_BUSY
#define HAL_CRYP_ERROR_TIMEOUT
#define HAL_CRYP_ERROR_NOT_SUPPORTED
#define HAL_CRYP_ERROR_AUTH_TAG_SEQUENCE
#define HAL_CRYP_ERROR_INVALID_CALLBACK
|
|
Algorithm / chaining mode ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_CHAINMODE_AES_ECB
#define CRYP_AES_ECB
#define CRYP_CHAINMODE_AES_CBC
#define CRYP_AES_CBC
#define CRYP_CHAINMODE_AES_CTR
#define CRYP_AES_CTR
#define CRYP_CHAINMODE_AES_GCM_GMAC
#define CRYP_AES_GCM_GMAC
#define CRYP_AES_GCM
#define CRYP_CHAINMODE_AES_CCM
#define CRYP_AES_CCM
#define CRYP_CHAINMODE_AES_CMAC
|
|
DMA input phase management constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DMAIN_ENABLE
#define CRYP_DMAOUT_ENABLE
#define CRYP_DMAOUT_DISABLE
#define CRYP_DMAIN_DISABLE
|
|
GCM/GMAC and CCM/CMAC processing phase constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_GCM_INIT_PHASE
#define CRYP_GCMCMAC_HEADER_PHASE
#define CRYP_GCM_PAYLOAD_PHASE
#define CRYP_GCMCMAC_FINAL_PHASE
#define CRYP_INIT_PHASE
#define CRYP_HEADER_PHASE
#define CRYP_PAYLOAD_PHASE
#define CRYP_FINAL_PHASE
|
|
Enable state constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_AES_DISABLE
#define CRYP_AES_ENABLE
|
|
Operating mode constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_ALGOMODE_ENCRYPT
#define CRYP_ALGOMODE_KEYDERIVATION
#define CRYP_ALGOMODE_DECRYPT
#define CRYP_ALGOMODE_KEYDERIVATION_DECRYPT
#define CRYP_ALGOMODE_TAG_GENERATION
|
|
Key and init vector configuration skip mode constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYIVCONFIG_ALWAYS
#define CRYP_KEYIVCONFIG_ONCE
#define CRYP_KEYNOCONFIG
#define CRYP_IVCONFIG_ONCE
|
|
Data width unit constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DATAWIDTHUNIT_WORD
#define CRYP_DATAWIDTHUNIT_BYTE
|
|
Header width unit constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_HEADERWIDTHUNIT_WORD
#define CRYP_HEADERWIDTHUNIT_BYTE
|
|
Clear flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_CLEAR_CCF
#define CRYP_CCF_CLEAR
#define CRYP_ERR_CLEAR
#define CRYP_CLEAR_RWEIF
#define CRYP_CLEAR_RNGEIF
|
|
Key size constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYSIZE_128B
#define CRYP_KEYSIZE_256B
|
#define HAL_AES_KEY_SIZE_128BIT
#define HAL_AES_KEY_SIZE_256BIT
|
Flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_FLAG_BUSY
#define CRYP_FLAG_WRERR
#define CRYP_FLAG_RDERR
#define CRYP_FLAG_CCF
#define CRYP_FLAG_KEYVALID
#define CRYP_FLAG_KEIF
#define CRYP_FLAG_RWEIF
#define CRYP_FLAG_RNGEIF
|
#define HAL_AES_FLAG_BUSY
#define HAL_AES_FLAG_WRERR
#define HAL_AES_FLAG_RDERR
#define HAL_AES_FLAG_CC
#define HAL_AES_FLAG_KEYVALID
#define HAL_AES_FLAG_KERR
#define HAL_AES_FLAG_RDWRERR
#define HAL_AES_FLAG_RNGERR
|
Interrupts enable bits constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_IT_CCFIE
#define CRYP_IT_ERRIE
#define CRYP_IT_RWEIE
#define CRYP_IT_KEIE
#define CRYP_IT_RNGEIE
|
#define HAL_AES_IT_CC
Not yet implemented in HAL2
#define HAL_AES_IT_RDWRERR
#define HAL_AES_IT_KERR
#define HAL_AES_IT_RNGERR
|
Interrupts flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_IT_WRERR
#define CRYP_IT_RDERR
#define CRYP_IT_CCF
|
#define HAL_AES_ERROR_WRITE
#define HAL_AES_ERROR_READ
#define HAL_AES_FLAG_CC
|
Key select constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYSEL_NORMAL
#define CRYP_KEYSEL_HW
#define CRYP_KEYSEL_SW
#define CRYP_KEYSEL_HSW
|
Removed; used in the private code
#define HAL_AES_KEY_SELECT_DHUK
#define HAL_AES_KEY_SELECT_BHK
#define HAL_AES_KEY_SELECT_DHUK_XOR_BHK
|
Key protection constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYPROT_ENABLE
#define CRYP_KEYPROT_DISABLE
|
#define HAL_AES_KEY_PROTECTION_ENABLED
#define HAL_AES_KEY_PROTECTION_DISABLED
|
Data type constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DATATYPE_32B
/* or */
#define CRYP_NO_SWAP
|
#define HAL_AES_DATA_SWAPPING_NO
|
#define CRYP_DATATYPE_16B
/* or */
#define CRYP_HALFWORD_SWAP
|
#define HAL_AES_DATA_SWAPPING_HALFWORD
|
#define CRYP_DATATYPE_8B
/* or */
#define CRYP_BYTE_SWAP
|
#define HAL_AES_DATA_SWAPPING_BYTE
|
#define CRYP_DATATYPE_1B
/* or */
#define CRYP_BIT_SWAP
|
#define HAL_AES_DATA_SWAPPING_BIT
|
Key mode constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYMODE_NORMAL
#define CRYP_KEYMODE_SHARED
#define CRYP_KEYMODE_WRAPPED
|
#define HAL_AES_KEY_MODE_NORMAL
#define HAL_AES_KEY_MODE_SHARED
#define HAL_AES_KEY_MODE_WRAPPED
|
Related concept: